package br.com.advance.automacao.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import br.com.advance.automacao.enumeration.TipoErro;

@Entity
@Table(name = "REGISTRO_ERROS_SISTEMA")
public class RegistroErroSistema {

	@Id
    @Column(name = "ID")
	@GeneratedValue
	private Long id;

	@Column(name = "DATA", nullable=false)
	@Temporal(value=TemporalType.TIMESTAMP)
	private Date data;

	@Column(name = "TIPO_ERRO", nullable=false, length=1, columnDefinition="INTEGER")
	@Enumerated(value=EnumType.ORDINAL)
	private TipoErro tipoErro;

	@Column(name = "DESCRICAO", nullable=false, length=1000, columnDefinition="VARCHAR")
	private String descricao;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Date getData() {
		return data;
	}

	public void setData(Date data) {
		this.data = data;
	}

	public TipoErro getTipoErro() {
		return tipoErro;
	}

	public void setTipoErro(TipoErro tipoErro) {
		this.tipoErro = tipoErro;
	}

	public String getDescricao() {
		return descricao;
	}

	public void setDescricao(String descricao) {
		this.descricao = descricao;
	}

}
